﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 静态字段
{
    class Student
    {
       public static string _teacherName = "唐僧";

        private string _name;
        private int _age;
        private char _gender;
        public string Name { get => _name; set => _name = value; }
        public char Gender { get => _gender; set => _gender = value; }
        public int Age { get => _age; set => _age = value; }

        public void GetStudentMsg()
        {
            Console.WriteLine("我是{0}，我是一位{1}同学，我现在{2}岁，现在老师是{3}",this.Name,this.Gender,this.Age,_teacherName);
        }
    }
}
